<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			#wrap{
				width: 400px;
				height: 200px;
				padding: 100px;
				border: 1px solid;
				margin: 100px auto;
				perspective: 800px;
			}
			#wrap:hover #box{
				transform: rotateY(360deg);
			}
			#box{
				position: relative;
				width: 400px;
				height: 200px;
				/*background: deeppink;*/
				transition: 2s;
				transform-style: preserve-3d;
			}
			#box div{
				position: absolute;
				width: 400px;
				height: 200px;
				line-height: 200px;
				text-align: center;
				font-size: 50px;
				background: pink;
				backface-visibility: hidden;
			}
			#box div:nth-of-type(1){
				background: pink;
			}
			#box div:nth-of-type(2){
				background: gray;
				transform: rotateY(180deg);
			}
		</style>
	</head>
	<body>
		<div id="wrap">
			<div id="box">
				<div>1</div>
				<div>2</div>
			</div>
		</div>
	</body>
</html>
